<%-- 
    Document   : LoginPage
    Created on : Mar 11, 2010, 10:47:19 PM
    Author     : aaronfrost
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="java.util.Random " %>
<%@page import="java.awt.datatransfer.StringSelection" %>
<%@page import="java.awt.datatransfer.ClipboardOwner" %>
<%@page import="java.awt.datatransfer.Transferable" %>
<%@page import="java.awt.datatransfer.Clipboard" %>
<%@page import="java.awt.Toolkit" %>
<%@page import="powerpass.Clippy" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%!
    int num;

    public String getRandomNumber()
    {
        Random gen = new Random();
        num = gen.nextInt(10);
        System.out.println(String.valueOf(num));
        return String.valueOf(num);
    }
    public void myTest(String inString)
    {
        
        Clipboard cp = Toolkit.getDefaultToolkit().getSystemClipboard();
        StringSelection ss = new StringSelection(inString);
        cp.setContents(ss, null);
    }
%>
<script language="javascript" type="text/javascript">
function haveALaugh()
{
    alert("Preparing to have a laugh")
    var myCB = new powerpass.Clippy();
    myCB.setText("HAHA worked");
    alert("Had a laugh");8==D
}

</script>



<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>aFro Test Page</title>
    </head>
    <body>
        <jsp:useBean id="myClippy" scope="session" class="powerpass.Clippy"/>
        <form name="myForm1" id="myForm1">
            <h1><%= getRandomNumber() %></h1>
            <input type=submit value="Submit">
        </form>
        <input id="myButton" type="button" onclick="<jsp:setProperty name="myClippy" property="text" value="8==D" />;alert('made it');" value="MyButton"/>
    </body>
</html>
